import request from '@/config/axios'

export interface OldInfoVO {
  name: string
  identityCard: number
  sex: string
  mobile: number
  maritalStatus: string
  birthday: string
  birthdayType: string
  type: string
  liveType: string
  address: string
  domicileAddress: string
  politicalOutlook: string
  careCard: string
  financial: string
  monthlyIncome: string
  healthCare: string
  socialSecurityNumber: string
  bloodType: string
  degreeEducation: string
  professional: string
  professionalTitle: string
  srcUnit: string
  personality: string
  dietaryCharacteristics: string
  speciality: string
  hobby: string
  picture: string
  contractSignDate: string
  contractExpireDate: string
  checkinDate: string
}

// 查询老人信息列表
export const getElderInfo = async (params) => {
  return await request.get({ url: '/elder/elder-info/query', params })
}

// 新增老人信息
export const createElder = async (data: OldInfoVO) => {
  return await request.post({ url: '/elder/elder-info/insert', data })
}
// 修改角色
export const updateElder = async (data: OldInfoVO) => {
  return await request.put({ url: '/elder/elder-info/update', data })
}
